import React from 'react';
import { Tooltip } from 'antd';

export default props => {
  const { data } = props;
  return (
    <Tooltip placement="topLeft" title={data}>
      <div
        style={{
          width: '100%',
          textOverflow: 'ellipsis',
          whiteSpace: 'nowrap',
          overflow: 'hidden',
        }}
      >
        {data}
      </div>
    </Tooltip>
  );
};
